Release 10.1A: OpenEdge Reporting:
Deploying Crystal Reports
Understanding transactions and isolation levels
SQL defines isolation levels in terms of the inconsistencies they allow:
Table 1–1 identifies which inconsistencies are either permitted or prevented by each isolation level.
Dirty read
A Dirty read occurs when one user is updating or inserting a record. At the same time, a different user is also reading it, but has not yet committed any work to the database.
Nonrepeatable read
A Nonrepeatable read occurs when one user is repeating a read operation on the same records but has updated values.
Phantom read
A Phantom read occurs when one user is repeating a read operation on the same records, but has new records in the results set:
READ UNCOMMITTEDAlso called a Dirty read. When this isolation level is used, a transaction can read uncommitted data that later may be rolled back. A transaction that uses this isolation level can only fetch data but can’t update, delete, or insert data.
READ COMMITTEDWith this isolation level, Dirty reads are not possible, but if the same row is read repeatedly during the same transaction, its contents may be changed or the entire row may be deleted by other transactions.
REPEATABLE READThis isolation level guarantees that a transaction can read the same row many times and it will remain intact. However, if a query with the same search criteria (the same
WHEREclause) is executed more than once, each execution may return different set of rows. This may happen because other transactions are allowed to insert new rows that satisfy the search criteria or update some rows in such way that they now satisfy the search criteria.SERIALIZABLEThis isolation level guarantees that none of the above happens. In addition, it guarantees that transactions that use this level will be completely isolated from other transactions.
Based on this information, we can provide basic guidelines for choosing the proper isolation level for the ODBC connection that is going to be used by Crystal Reports:
READ UNCOMMITTEDshould be used with reports that do not rely on data accuracy. Usually these same reports also process/access a high number of records. This optimizes performance while executing your report with a minimum number of database locks. Examples of reports in this category:
COMMITTED READshould be used with reports running daily on data that is frequently modified. This enables good performance while executing reports on a “live” database with an average number of record locks that are immediately released. Examples of reports in this category include:
REPEATABLE READandSERIALIZABLEshould not be used with reports as they do not add value at the time the report is generated, especially when compared toCOMMITTED READ.Having reviewed the transaction isolation levels, you can now configure your ODBC driver.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |